import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    // 首页
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
      alias: '/', // 添加别名
    },
    // 日历
    {
      path: '/calendar',
      name: 'calendar',
      component: () => import('../views/CalendarView.vue'),
    },
    // 社区
    {
      path: '/community',
      name: 'community',
      component: () => import('../views/CommunityView.vue'),
    },
    // 我的
    {
      path: '/mine',
      name: 'mine',
      component: () => import('../views/MineView.vue'),
    },
    // 启动页
    {
      path: '/bootPage',
      name: 'bootpage',
      component: () => import('../views/LoginRegister/BootPage.vue'),
    },

    // 、登录页
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginRegister/LoginView.vue'),
    },

    // 引导页1
    {
      path: '/guidepage1',
      name: 'guidepage1',
      component: () => import('../views/LoginRegister/GuidePage1.vue'),
    },
    // 引导页2
    {
      path: '/guidepage2',
      name: 'guidepage2',
      component: () => import('../views/LoginRegister/GuidePage2.vue'),
    },
    // 引导页3
    {
      path: '/guidepage3',
      name: 'guidepage3',
      component: () => import('../views/LoginRegister/GuidePage3.vue'),
    },
    // 账户信息
    {
      path: '/accountmessage',
      name: 'accountmessage',
      component: () => import('../views/LoginRegister/AccountMessage.vue'),
    },
    // 邮箱验证
    {
      path: '/maibox',
      name: 'maibox',
      component: () => import('../views/LoginRegister/MailBox.vue'),
    },
    {
      path: '/activity',
      name: 'activity',
      component: () => import('../views/ActivityView.vue'),
    },
    {
      path: '/yogaposes',
      name: 'yogaposes',
      component: () => import('../views/YogaPosesView.vue'),
    },
    {
      path: '/activitylist',
      name: 'activitylist',
      component: () => import('../views/ActivityListView.vue'),
    },
    {
      path: '/chapterdetails/:chapterlist',
      name: 'chapterdetails',
      component: () => import('../views/ChapterDetailsView.vue'),
      props: true,
    },
    {
      path: '/motionlist',
      name: 'motionlist',
      component: () => import('../views/MotionListView.vue'),
    },
    {
      path: '/sportschapter',
      name: 'sportschapter',
      component: () => import('../views/SportsChapterView.vue'),
    },
    // 开始训练
    {
      path: '/menu',
      name: 'menu',
      component: () => import('../views/MeNuView.vue'),
    },
    // 饮食
    {
      path: '/diet',
      name: 'diet',
      component: () => import('../views/DietView.vue'),
    },
    // 苹果
    {
      path: '/apple',
      name: 'apple',
      component: () => import('../views/AppleView.vue'),
    },
    // 你很健康
    {
      path: '/healthy',
      name: 'healthy',
      component: () => import('../views/HealthyView.vue'),
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('../views/SearchView.vue'),
    },
    // 添加
    {
      path: '/Addsomething',
      name: 'Addsomething',
      component: () => import('../views/AddSomething.View.vue'),
    },
    {
      path: '/news',
      name: 'news',
      component: () => import('../views/NewsView.vue'),
    },
    {
      path: '/Drinkwater',
      name: 'Drinkwater',
      component: () => import('../views/DrinkWaterView.vue'),
    },
    // 总运动
    {
      path: '/SportsView',
      name: 'SportsView',
      component: () => import('../views/SportsView.vue'),
    },
    // 跑步
    {
      path: '/RunningView',
      name: 'RunningView',
      component: () => import('../views/RunningView.vue'),
    },
    //医生
    {
      path: '/Doctor',
      name: 'Doctor',
      component: () => import('../views/DoctorView.vue'),
    },
    //预约日历
    {
      path: '/Booking',
      name: 'Booking',
      component: () => import('../views/BookingView.vue'),
    },
    //科室
    {
      path: '/Department',
      name: 'Department',
      component: () => import('../views/DepartmentView.vue'),
    },
    //空
    {
      path: '/null',
      name: 'null',
      component: () => import('../views/NullView.vue'),
    },
  ],
})
export default router
